#TidyTuesday #PydyTuesday
A Weekly Data Project

Marc Dotson

2025-03-27

  • Weekly social data project
  • Opportunity to practice, add to portfolios
  • New project provided every week
  • Share with #TidyTuesday #PydyTuesday
  • Named after the “tidy” data philosophy
  • Get started at tidytues.day

import polars as pl
import seaborn.objects as so

pokemon_url = 'https://raw.githubusercontent.com/rfordatascience/tidytuesday/main/data/2025/2025-04-01/pokemon_df.csv'
pokemon_df = pl.read_csv(pokemon_url, null_values = ['NA'])

# Which primary type is most common?
(pokemon_df
  .group_by(pl.col(['type_1']))
  .agg(n = pl.len())
  .sort(pl.col('n'), descending = True)
)

# What's the relationship between attack, hp, and primary type?
(so.Plot(pokemon_df, x = 'attack', y = 'hp')
  .add(so.Dot(pointsize = 5, alpha = 0.50))
  .add(so.Line(), so.PolyFit(order = 1))
)

(so.Plot(pokemon_df, x = 'attack', y = 'hp')
  .add(so.Dot(pointsize = 5, alpha = 0.50))
  .add(so.Line(), so.PolyFit(order = 1))
  .facet(col = 'type_1', wrap = 3)
)